import request from '@/utils/request'

// 查询团购信息列表
export function listGroupPurchase(query) {
  return request({
    url: '/find/groupPurchase/list',
    method: 'get',
    params: query
  })
}

// 查询团购信息详细
export function getGroupPurchase(groupPurchaseId) {
  return request({
    url: '/find/groupPurchase/' + groupPurchaseId,
    method: 'get'
  })
}

// 新增团购信息
export function addGroupPurchase(data) {
  return request({
    url: '/find/groupPurchase',
    method: 'post',
    data: data
  })
}

// 修改团购信息
export function updateGroupPurchase(data) {
  return request({
    url: '/find/groupPurchase',
    method: 'put',
    data: data
  })
}

// 删除团购信息
export function delGroupPurchase(groupPurchaseId) {
  return request({
    url: '/find/groupPurchase/' + groupPurchaseId,
    method: 'delete'
  })
}
